home *** CD-ROM | disk | FTP | other *** search
/ CDUTIL 13 / CDUTIL #13 Julio 1995.iso / windows / amipro3 / macros.cmz / ORGANIZE.SMM < prev    next >
Encoding:
INI File  |  1992-11-18  |  6.1 KB  |  410 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     _macro.sty
  5. [files]
  6. [charset]
  7.     82
  8.     ANSI (Windows, IBM CP 1252)
  9. [revisions]
  10.     0
  11. [prn]
  12.     PostScript Printer
  13. [port]
  14.     LPT1:
  15. [lang]
  16.     1
  17. [desc]
  18.     Esta macro ejecuta Organizer de Lotus.
  19.     Lotus WPD Marketing
  20.     Beginner
  21.     Exec, ActivateApp
  22.     noautorun
  23.     714877557
  24.     25
  25.     674329275
  26.     145
  27.     2
  28.     0
  29.     0
  30.     0
  31.     0
  32.     
  33.     
  34.     
  35.     
  36.     
  37.     
  38.     0
  39. [fopts]
  40.     0
  41.     1
  42.     0
  43.     0
  44. [lnopts]
  45.     2
  46.     Body Text
  47.     1
  48. [docopts]
  49.     5
  50.     2
  51. [GramStyle]
  52.     
  53. [ParaNum]
  54.     1
  55. [tag]
  56.     Est<\a>ndar
  57.     5
  58.     [fnt]
  59.         Tms Rmn
  60.         240
  61.         0
  62.         49152
  63.     [algn]
  64.         1
  65.         1
  66.         0
  67.         0
  68.         0
  69.     [spc]
  70.         17
  71.         0
  72.         1
  73.         0
  74.         0
  75.         1
  76.         100
  77.     [brk]
  78.         4
  79.     [line]
  80.         8
  81.         0
  82.         1
  83.         0
  84.         1
  85.         1
  86.         1
  87.         10
  88.         10
  89.         1
  90.     [spec]
  91.         0
  92.         0
  93.         
  94.         0
  95.         1
  96.         1
  97.         0
  98.         0
  99.         0
  100.         0
  101.     [nfmt]
  102.         24
  103.         1
  104.         2
  105.         ,
  106.         .
  107.         Pts
  108.     Est<\a>ndar
  109.     0
  110.     0
  111. [l1]
  112.     0
  113. [pg]
  114.     2
  115.     49 0 78 0 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  116.     77 0 0 1025 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  117. [edoc]
  118. <:#293,9025>Macro by <+!>Charlie Pappas<-!>
  119.  
  120. <:#279,9025>
  121.  
  122. @Function@<:#293,9025>function execsuite()
  123.  
  124. <:#279,9025>app = "organize.exe"
  125.  
  126. <:#279,9025>appname = "Lotus Organizer"
  127.  
  128. <:#279,9025>windir = GetWindowsDirectory$()
  129.  
  130. <:#279,9025>defdir = "{windir}organize"
  131.  
  132. <:#279,9025>ignorekeyboard(2)
  133.  
  134. <:#279,9025>declare missouri(xapp) ' <:f200,QCourier,0,0,255>declare user defined functions
  135.  
  136. <:#279,9025>declare getprofile(xappname)
  137.  
  138. <:#279,9025>declare writeprofile(path, xappname)
  139.  
  140. <:#279,9025>declare tryit(path, xapp)
  141.  
  142. <:#279,9025>defstr path;
  143.  
  144. <:#279,9025>
  145.  
  146. <:#279,9025>if appisrunning(appname) ' <:f200,QCourier,0,0,255>first see if app is already running
  147.  
  148. <:#279,9025>    activateapp(appname) ' <:f200,QCourier,0,0,255>if the app is running, just activate it
  149.  
  150. <:#279,9025>    apprestore(appname) ' <:f200,QCourier,0,0,255>make sure it is not minimized<:f>
  151.  
  152. <:#279,9025>    return 1
  153.  
  154. <:#279,9025>endif
  155.  
  156. <:#279,9025>if 0 = doschdir(defdir) ' <:f200,QCourier,0,0,255>try and change to the default directory for launch
  157.  
  158. <:#279,9025>    if tryit("", app) <;> 31
  159.  
  160. <:#279,9025>        return 1
  161.  
  162. <:#279,9025>    endif
  163.  
  164. <:#279,9025>endif
  165.  
  166. <:#279,9025>if tryit(getprofile(appname), app) <;> 31 ' <:f200,QCourier,0,0,255>if we launch, get out<:f>
  167.  
  168. <:#279,9025>    return 1
  169.  
  170. <:#279,9025>endif
  171.  
  172. <:#279,9025>again:
  173.  
  174. <:#279,9025>if assign(&path, missouri(app)) <<<;> 0 ' <:f200,QCourier,0,0,255>show me where the exe is
  175.  
  176. <:#279,9025>    if tryit(path, app) <;> 31
  177.  
  178. <:#279,9025>        writeprofile(path, appname)
  179.  
  180. <:#279,9025>    else
  181.  
  182. <:#279,9025>        goto again
  183.  
  184. <:#279,9025>    endif
  185.  
  186. <:#279,9025>endif
  187.  
  188. <:#279,9025>end function
  189.  
  190. <:#279,9025>
  191.  
  192. @Function@<:#293,9025>function tryit(path, app) ' <:f200,QCourier,0,0,255>this function attemts to exec the app
  193.  
  194. <:#279,9025>doschdir(path)
  195.  
  196. <:#279,9025>return exec(strcat$(path, app), "")
  197.  
  198. <:#279,9025>end function
  199.  
  200. <:#279,9025>
  201.  
  202. @Function@<:#293,9025>function writeprofile(path, appname) ' <:f200,QCourier,0,0,255>save the path if exec works
  203.  
  204. <:#279,9025>writeprofilestring("LotusApps", appname, path, "amipro2.ini")
  205.  
  206. <:#279,9025>end function
  207.  
  208. <:#279,9025>
  209.  
  210. @Function@<:#293,9025>function getprofile(appname) ' <:f200,QCourier,0,0,255>get the path of successful exec
  211.  
  212. <:#279,9025>defstr path;
  213.  
  214. <:#279,9025>if assign(&path, getprofilestring$("LotusApps", appname, "amipro2.ini")) <<<;> ""
  215.  
  216. <:#279,9025>    return path
  217.  
  218. <:#279,9025>endif
  219.  
  220. <:#279,9025>return getprofilestring$("LotusApps", appname, "amipro.ini")
  221.  
  222. <:#279,9025>end function
  223.  
  224. <:#279,9025>
  225.  
  226. @Function@<:#293,9025>function missouri(app) ' <:f200,QCourier,0,0,255>ask user for location of exe
  227.  
  228. <:#279,9025>defstr box;
  229.  
  230. <:#279,9025>filledit(9001, "*.exe")
  231.  
  232. <:#279,9025>filledit(8007, app)
  233.  
  234. <:#279,9025>if assign(&box, dialogbox(".", "findapp")) <<<;> 1
  235.  
  236. <:#279,9025>    return 0
  237.  
  238. <:#279,9025>endif
  239.  
  240. <:#279,9025>return getcurrentdir$()
  241.  
  242. <:#279,9025>end function
  243.  
  244. <:#279,9025>
  245.  
  246. <:#279,9025>
  247.  
  248. @Function@<:#293,9025>DIALOG findapp
  249.  
  250. -2134376448 7 70 35 200 97 "" "" "B<\z>squeda de la aplicaci<\s>n"
  251.  
  252. <:#279,9025>FONT 8 "Helv"
  253.  
  254. 7 34 59 8 1000 1342177280 "static" "&V<\m>a de acceso:" 0 
  255.  
  256. <:#279,9025>6 45 60 44 9001 1352728579 "listbox" "" 0 
  257.  
  258. <:#279,9025>155 5 40 14 1 1342373889 "button" "Aceptar" 0 
  259.  
  260. <:#279,9025>155 21 40 14 2 1342373888 "button" "Cancelar" 0 
  261.  
  262. <:#279,9025>68 34 80 8 7999 1342177280 "static" "" 0 
  263.  
  264. 7 6 142 9 1006 1342177280 "static" "Seleccione el directorio donde se halla" 0 
  265.  
  266. <:#279,9025>7 16 107 8 8007 1342177280 "static" "" 0 
  267.  
  268. <:#279,9025>END DIALOG
  269.  
  270. <:#279,9025>
  271.  
  272. >
  273.  
  274. [Embedded]
  275. 00004598
  276. >
  277. [macsum] 6
  278. execsuite 0 0 6 2
  279. tryit 549 2 1 37
  280. writeprofile 630 2 1 42
  281. getprofile 704 1 2 46
  282. missouri 878 1 2 54
  283. findapp 1035 0 -1 65
  284. [macse]
  285. 14 execsuite
  286. 7 "organize.exe"
  287. 8 1
  288. 7 "Lotus Organizer"
  289. 8 2
  290. 0 1288
  291. 13
  292. 8 3
  293. 7 "{3}organize"
  294. 8 4
  295. 0 32 2
  296. 0 1032 "{2}"
  297. 13
  298. 11 00000179
  299. 0 38 "{2}"
  300. 0 1031 "{2}"
  301. 5 1
  302. 15
  303. 9
  304. 5 0
  305. 0 781 "{4}"
  306. 13
  307. 18 0
  308. 11 00000280
  309. 16 tryit "" "{1}"
  310. 13
  311. 5 31
  312. 18 3
  313. 11 00000280
  314. 5 1
  315. 15
  316. 9
  317. 16 getprofile "{2}"
  318. 13
  319. 16 tryit [X] "{1}"
  320. 13
  321. 5 31
  322. 18 3
  323. 11 00000366
  324. 5 1
  325. 15
  326. 9
  327. 16 missouri "{1}"
  328. 13
  329. 0 805 &5 [X]
  330. 13
  331. 5 0
  332. 18 1
  333. 11 00000537
  334. 16 tryit "{5}" "{1}"
  335. 13
  336. 5 31
  337. 18 3
  338. 11 00000524
  339. 16 writeprofile "{5}" "{2}"
  340. 10 00000537
  341. 10 00000366
  342. 6 0
  343. 15
  344. 9
  345. 14 tryit
  346. 0 781 "{0}"
  347. 0 16 "{0}" "{1}"
  348. 13
  349. 0 22 [X] ""
  350. 13
  351. 15
  352. 9
  353. 6 2
  354. 15
  355. 9
  356. 14 writeprofile
  357. 0 287 "LotusApps" "{1}" "{0}" "amipro2.ini"
  358. 6 2
  359. 15
  360. 9
  361. 14 getprofile
  362. 0 286 "LotusApps" "{0}" "amipro2.ini"
  363. 13
  364. 0 805 &2 [X]
  365. 13
  366. 7 ""
  367. 18 1
  368. 11 00000113
  369. 6 2
  370. 15
  371. 9
  372. 0 286 "LotusApps" "{0}" "amipro.ini"
  373. 13
  374. 15
  375. 9
  376. 6 1
  377. 15
  378. 9
  379. 14 missouri
  380. 0 31 9001 "*.exe"
  381. 0 31 8007 "{0}"
  382. 0 26 "." "findapp"
  383. 13
  384. 0 805 &2 [X]
  385. 13
  386. 5 1
  387. 18 1
  388. 11 00000127
  389. 5 0
  390. 15
  391. 9
  392. 0 290
  393. 13
  394. 15
  395. 9
  396. 6 1
  397. 15
  398. 9
  399. DIALOG findapp
  400. -2134376448 7 70 35 200 97 "" "" "B·squeda de la aplicaci≤n" 
  401. FONT 8 "Helv" 
  402. 7 34 59 8 1000 1342177280 "static" "&Vφa de acceso:" 0 
  403. 6 45 60 44 9001 1352728579 "listbox" "" 0 
  404. 155 5 40 14 1 1342373889 "button" "Aceptar" 0 
  405. 155 21 40 14 2 1342373888 "button" "Cancelar" 0 
  406. 68 34 80 8 7999 1342177280 "static" "" 0 
  407. 7 6 142 9 1006 1342177280 "static" "Seleccione el directorio donde se halla" 0 
  408. 7 16 107 8 8007 1342177280 "static" "" 0 
  409. 00004623
  410.